﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:myBoard_App_Model="clr-namespace:myBoard.App.Model"
	xmlns:local="clr-namespace:myBoard.App"
	xmlns:myBoard_App_Components_MagnetsStore_Converters="clr-namespace:myBoard.App.Components.MagnetsStore.Converters"
	x:Class="myBoard.App.MagnetDetails"
	x:Name="UserControl">
	<UserControl.Resources>
		<myBoard_App_Components_MagnetsStore_Converters:ContainsStringToVisibilityInvertedConverter x:Key="ContainsStringToVisibilityInvertedConverter"/>
		<DataTemplate x:Key="ScreenshotDataTemplate">
			<Border Margin="5" Width="100" Height="80" BorderThickness="2" CornerRadius="5" BorderBrush="#FF686868">
				<Image Source="{Binding}" Width="Auto" Height="Auto"/>
			</Border>
		</DataTemplate>
		<DataTemplate x:Key="CategoryDataTemplate">
			<Grid>
				<CheckBox Content="{Binding Name}" Margin="0" d:LayoutOverrides="Width, Height" Foreground="#FF737373" IsChecked="{Binding IsChecked, Mode=TwoWay}"/>
			</Grid>
		</DataTemplate>
		<ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
			<WrapPanel IsItemsHost="True"/>
		</ItemsPanelTemplate>
	</UserControl.Resources>

	<Grid Margin="0,0,0,0" MinWidth="479">
		<Grid.RowDefinitions>
			<RowDefinition Height="70"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*"/>
		</Grid.ColumnDefinitions>
		<StackPanel Width="Auto" Height="Auto" d:LayoutOverrides="Height" Margin="10,0" Grid.Row="1">
			<Grid Height="22.207" Margin="0">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="100"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<TextBlock HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Foreground="#FF737373" Text="Name" TextWrapping="Wrap"/>
				<TextBox Background="{x:Null}" BorderBrush="{x:Null}" FontFamily="Calibri" FontSize="10" Foreground="#FF737373" x:Name="_nameTbx" Style="{DynamicResource StoreTextboxStyle1}" TextWrapping="Wrap" Margin="15,0,0,0" Grid.Column="1" d:LayoutOverrides="Width" ToolTip="Enter magnet's name" Text="{Binding Name}"/>
			</Grid>
			<Grid Margin="0,10,0,0" Height="22.207">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="100"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<TextBlock HorizontalAlignment="Right" Margin="0,3,0,0" VerticalAlignment="Top" Foreground="#FF737373" Text="Short description" TextWrapping="Wrap"/>
				<TextBox Text="{Binding ShortDesc}" Background="{x:Null}" BorderBrush="{x:Null}" FontFamily="Calibri" FontSize="10" Foreground="#FF737373" x:Name="_shortDescTbx" Style="{DynamicResource StoreTextboxStyle1}" TextWrapping="Wrap" Margin="15,0,0,0" Grid.Column="1" d:LayoutOverrides="Width" ToolTip="Enter magnet's name"/>
			</Grid>
			<Grid Margin="0,10,0,0">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="100"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<TextBlock HorizontalAlignment="Right" Margin="0,3,0,0" VerticalAlignment="Top" Foreground="#FF737373" Text="Long description" TextWrapping="Wrap"/>
				<TextBox Text="{Binding LongDesc}" Background="{x:Null}" BorderBrush="{x:Null}" FontFamily="Calibri" FontSize="10" Foreground="#FF737373" x:Name="_longDescTbx" Margin="15,0,0,0" Grid.Column="1" d:LayoutOverrides="Width" Style="{DynamicResource StoreTextboxStyle1}" MinHeight="60" AcceptsTab="True" AcceptsReturn="True"/>
			</Grid>
			<Grid Margin="0,10,0,0" Height="90">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="100"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<TextBlock HorizontalAlignment="Right" Margin="0,3,0,0" VerticalAlignment="Top" Foreground="#FF737373" TextWrapping="Wrap" Text="Category"/>
				<ListBox ItemsSource="{Binding Categories, Mode=TwoWay}" x:Name="_categoriesSelector" Grid.Column="1" Margin="15,0,0,0" ItemTemplate="{DynamicResource CategoryDataTemplate}">
					<ListBox.Background>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FFDDDDDD" Offset="0"/>
							<GradientStop Color="#FFDDDDDD" Offset="1"/>
							<GradientStop Color="#FFF0F0F0" Offset="0.294"/>
						</LinearGradientBrush>
					</ListBox.Background>
				</ListBox>
			</Grid>
			<Grid Height="22.207" Margin="0,10,0,0">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="100"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<TextBlock HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Foreground="#FF737373" Text="Store ID" TextWrapping="Wrap"/>
				<TextBox Background="{x:Null}" BorderBrush="{x:Null}" FontFamily="Calibri" FontSize="10" Foreground="#FF737373" x:Name="_storeIdTbx" Style="{DynamicResource StoreTextboxStyle1}" TextWrapping="Wrap" Margin="15,0,0,0" Grid.Column="1" d:LayoutOverrides="Width" ToolTip="Enter magnet's name" Text="{Binding StoreID}"/>
			</Grid>
			<Grid Margin="0,10">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="100"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<TextBlock HorizontalAlignment="Right" Margin="0,3,0,0" VerticalAlignment="Top" Foreground="#FF737373" TextWrapping="Wrap" Text="Magnet"/>
				<Grid Margin="15,0,0,0" Grid.Column="1" d:LayoutOverrides="Height">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="*"/>
						<ColumnDefinition Width="Auto"/>
					</Grid.ColumnDefinitions>
					<TextBox Text="{Binding MagnetPath, Mode=TwoWay}" Background="{x:Null}" BorderBrush="{x:Null}" FontFamily="Calibri" FontSize="10" Foreground="#FF737373" x:Name="_magnetDllPathTbx" Style="{DynamicResource StoreTextboxStyle1}" TextWrapping="Wrap" Margin="0" MinHeight="22" Height="22"/>
					<Button x:Name="_openMagnetDllBt" Margin="0" Style="{DynamicResource StoreButtonStyle1}" Content="..." Grid.Column="1" Cursor="Hand" Foreground="White" BorderBrush="#FF454545" ToolTip="Browse" Width="38"/>
				</Grid>
			</Grid>
			<Grid Margin="0">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="100"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<TextBlock HorizontalAlignment="Right" Margin="0,3,0,0" VerticalAlignment="Top" Foreground="#FF737373" TextWrapping="Wrap" Text="Thumbnail (png only)"/>
				<Grid Margin="15,0,0,0" Grid.Column="1" d:LayoutOverrides="Height">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="*"/>
						<ColumnDefinition Width="Auto"/>
					</Grid.ColumnDefinitions>
					<TextBox Text="{Binding ThumbnailPath, Mode=TwoWay}" Background="{x:Null}" BorderBrush="{x:Null}" FontFamily="Calibri" FontSize="10" Foreground="#FF737373" x:Name="_thumnailTbx" Style="{DynamicResource StoreTextboxStyle1}" TextWrapping="Wrap" Margin="0" MinHeight="22" Height="22"/>
					<Button x:Name="_openThumbnailBt" Margin="0" Style="{DynamicResource StoreButtonStyle1}" Content="..." Grid.Column="1" Cursor="Hand" Foreground="White" BorderBrush="#FF454545" Width="38" ToolTip="Browse" Height="22"/>
				</Grid>
			</Grid>
			<Grid Margin="0,10,0,0">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="100"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<TextBlock HorizontalAlignment="Right" Margin="0,4,0,0" VerticalAlignment="Top" Foreground="#FF737373" TextWrapping="Wrap" Text="Screenshots (png only)"/>
				<StackPanel Margin="15,1,0,0" Grid.Column="1" d:LayoutOverrides="Width">
					<Button x:Name="_addScreenshotBt" Style="{DynamicResource StoreButtonStyle1}" VerticalAlignment="Top" Width="100" Height="22" Content="Add" Foreground="White" d:LayoutOverrides="Height, VerticalMargin" HorizontalAlignment="Left" Cursor="Hand"/>
					<ListBox ItemsSource="{Binding ScreenshotsPath}" x:Name="_screenShotsLbx" Margin="0,5,0,0" ItemTemplate="{DynamicResource ScreenshotDataTemplate}" BorderBrush="{x:Null}" Background="{x:Null}" ItemsPanel="{DynamicResource ItemsPanelTemplate1}"/>
				</StackPanel>
			</Grid>
		</StackPanel>
		<StackPanel Height="Auto" Margin="10,0,0,0" d:LayoutOverrides="Height" Grid.Column="1" Grid.Row="1"/>
		<Image x:Name="_thumbnailImage" Source="{Binding ThumbnailPath}" Margin="5,0,4,4" Width="60" Height="60" HorizontalAlignment="Left"/>
	</Grid>
</UserControl>